package pw.hais.dz.dao;

import java.util.ArrayList;

import pw.hais.dao.BaseDao;
import pw.hais.dz.entity.User;

public class UserDao extends BaseDao<User>{
	
	/**
	 * 根据 用户名 查询用户
	 * @param username
	 * @return
	 */
	public User findUserByUserName(String username){
		ArrayList<User> list = findEntityList(" username = '"+username+"'");
		if(list.size()==1){
			return list.get(0);
		}
		return null;
	}

}
